package Agency.views;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JMenuItem;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author wangari
 */
public class HousesManagementview extends javax.swing.JFrame {

    /**
     * Creates new form HousesManagementview and sets the color background to light gray
     */
    public HousesManagementview() {
        this.getContentPane().setBackground(Color.LIGHT_GRAY);
        initComponents();
        setLocationRelativeTo(null);
    }
    /**
     * button to add a new house
     * @return jBAddNewHouse
     */
    public JButton addHouse(){
        return jBAddNewHouse;
    }
    /**
     * button to delete a house
     * @return jBDeleteHouse
     */
    public JButton deleteHouse(){
        return jBDeleteHouse;
    }
  /**
   * button to edit house details
   * @return jBEditHouseDetails
   */
    public JButton editHseDetails(){
        return jBEditHouseDetails;
    }
     /**
      * button to show all the available houses
      * @return jBAvailableHouses
      */
     public JButton availableHouses(){
         return jBAvailableHouses;
     }
     /**
      * button to close the view
      * @return jBClose
      */
     public JButton closeHousesView(){
         return jBClose;
     }
     /**
      * MenuItem to add a new house
      * @return jMAddHouse
      */
     public JMenuItem addNewHouse(){
         return jMAddHouse;
     }
     /**
      * MenuItem to delete the house
      * @return jMDeleteHouse
      */
    public JMenuItem deleteTheHouse(){
    return jMDeleteHouse;
}
    /**
     * Menu Item to show available houses
     * @return jMAvailableHouse
     */
    public  JMenuItem showAvailableHouses(){
        return jMAvailableHouse;
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenu3 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jBAddNewHouse = new javax.swing.JButton();
        jBDeleteHouse = new javax.swing.JButton();
        jBEditHouseDetails = new javax.swing.JButton();
        jBAvailableHouses = new javax.swing.JButton();
        jBClose = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMAddHouse = new javax.swing.JMenuItem();
        jMDeleteHouse = new javax.swing.JMenuItem();
        jMAvailableHouse = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();

        jMenu3.setText("jMenu3");

        jMenuItem1.setText("jMenuItem1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jBAddNewHouse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/addhouseicon.jpg"))); // NOI18N
        jBAddNewHouse.setText("AddNewHouse");

        jBDeleteHouse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/deletehouseicon.jpg"))); // NOI18N
        jBDeleteHouse.setText("Delete House");

        jBEditHouseDetails.setIcon(new javax.swing.ImageIcon(getClass().getResource("/editHseIcon.jpg"))); // NOI18N
        jBEditHouseDetails.setText("Edit House Details");

        jBAvailableHouses.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AvailableHousesIcon.jpg"))); // NOI18N
        jBAvailableHouses.setText("Available Houses");

        jBClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/closeIcon.jpg"))); // NOI18N
        jBClose.setText("Close");

        jLabel1.setText("Housing  Management");

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/housesIcon.jpg"))); // NOI18N

        jMenu1.setText("File");

        jMAddHouse.setText("AddNewHouse");
        jMenu1.add(jMAddHouse);

        jMDeleteHouse.setText("Delete House");
        jMenu1.add(jMDeleteHouse);

        jMAvailableHouse.setText("AvailableHouse");
        jMAvailableHouse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMAvailableHouseActionPerformed(evt);
            }
        });
        jMenu1.add(jMAvailableHouse);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jBAddNewHouse, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jBEditHouseDetails, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 101, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jBDeleteHouse, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jBAvailableHouses, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(44, 44, 44))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(241, 241, 241))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(201, 201, 201))))
            .addGroup(layout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addComponent(jBClose)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBDeleteHouse, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBAddNewHouse, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(51, 51, 51)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBEditHouseDetails)
                    .addComponent(jBAvailableHouses))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jBClose, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMAvailableHouseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMAvailableHouseActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMAvailableHouseActionPerformed

   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAddNewHouse;
    private javax.swing.JButton jBAvailableHouses;
    private javax.swing.JButton jBClose;
    private javax.swing.JButton jBDeleteHouse;
    private javax.swing.JButton jBEditHouseDetails;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JMenuItem jMAddHouse;
    private javax.swing.JMenuItem jMAvailableHouse;
    private javax.swing.JMenuItem jMDeleteHouse;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    // End of variables declaration//GEN-END:variables
}
